﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using System.Data;

namespace Web
{
    public partial class _do : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string type = Request["DoType"];

            switch (type)
            {
                case "CheckBD":
                    CheckBD();
                    break;
               
            }
        }


        private void CheckBD()
        {
            string xm = Request["SXM"].ToString();
            string mm = Request["XMM"].ToString();



            TESTBLL ListT = new TESTBLL();
            //t.Yz(xm, mm);

            DataSet ds = ListT.GetList(xm, mm);
            DataTable dt = ds.Tables[0];
            //dt.Rows[0]["NAME"]
            if (dt.Rows.Count > 0)
            {
                Response.Write(1);
            }
            else
            {
                Response.Write(0);
            }

            //str = new BLL.TEST
        }


        #region   分割字符串，提取方法
        /// <summary>
        /// 分割字符串，类如：   11.1|11.0|22.13|1233.1|09.01
        /// </summary>
        /// <param name="str">传入的字符串</param>
        private string StringSplit(string str)
        {
            string result = string.Empty;

            if (!string.IsNullOrEmpty(str))
            {
                string[] arr = str.Split('|');
                foreach (string item in arr)
                {
                    if (item.Split('.')[0].Equals("4"))
                    {
                        result = item.Split('.')[1];
                    }
                }

            }
            return result;
        }
        #endregion
    }
}